package com.lovo.student.frame;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

import com.lovo.netCRM.component.LovoButton;
import com.lovo.netCRM.component.LovoComboBox;
import com.lovo.netCRM.component.LovoDate;
import com.lovo.netCRM.component.LovoFileChooser;
import com.lovo.netCRM.component.LovoLabel;
import com.lovo.netCRM.component.LovoRadioButton;
import com.lovo.netCRM.component.LovoTitleLabel;
import com.lovo.netCRM.component.LovoTxt;
import com.lovo.netCRM.component.LovoTxtArea;


/**
 * 查看学生信息对话框
 * @author 白德柯
 *
 */
public class StudentShowDialog extends JDialog{


	/**姓名标签*/
	private LovoLabel nameLabel = new LovoLabel("姓    名",40,90,this);
	/**性别标签*/
	private LovoLabel genderLabel = new LovoLabel("性    别",300,90,this);
	/**出生日期标签*/
	private LovoLabel bornLabel = new LovoLabel("出生日期",40,130,this);
	/**所属班级标签*/
	private LovoLabel classLabel = new LovoLabel("所属班级",300,130,this);;
	/**家庭地址标签*/
	private LovoLabel addrLabel = new LovoLabel("家庭地址",40,170,this);
	/**联系电话标签*/
	private LovoLabel phoneLabel = new LovoLabel("联系电话",300,170,this);
	/**父亲标签*/
	private LovoLabel fatherLabel = new LovoLabel("父亲",40,210,this);
	/**父亲电话标签*/
	private LovoLabel fatherPhoneLabel = new LovoLabel("父亲电话",300,210,this);
	/**母亲标签*/
	private LovoLabel motherLabel = new LovoLabel("母亲",40,250,this);
	/**母亲电话标签*/
	private LovoLabel motherPhoneLabel = new LovoLabel("母亲电话",300,250,this);
	/**学生状态标签*/
	private LovoLabel statusLabel = new LovoLabel("学生状态",40,290,this);;
	/**备注标签*/
	private LovoLabel infoLabel = new LovoLabel("备注",300,290,this);
	
	/**学生id*/
	private int id;
	
	public StudentShowDialog(JFrame jf,int id){
		super(jf,true);
		this.id = id;
		this.setLayout(null);
		this.setTitle("查看学生信息");
		this.init();
		
		Dimension screensize = Toolkit.getDefaultToolkit().getScreenSize();
		int x = (int) screensize.getWidth() / 2 - 300;
		int y = (int) screensize.getHeight() / 2 - 240;
		this.setBounds(x, y, 600, 480);
		this.setVisible(true);
	}
	/**
	 * 初始化
	 *
	 */
	private void init(){
		LovoTitleLabel titleLabel = new LovoTitleLabel("查看学生信息",this);
		titleLabel.setLocation(220, titleLabel.getY());
		this.initData(id);
		LovoButton closeButton = new LovoButton(220,360,"关闭","image/ok.png",this);
		closeButton.addActionListener(new ActionListener(){

			public void actionPerformed(ActionEvent e) {
				StudentShowDialog.this.dispose();
			}});
		
	}
	

	/**
	 * 初始化数据
	 * @param id
	 */
	private void initData(int id){
		
	}
	/**
	 * 修改操作
	 *
	 */
	private boolean update(){
		return true;
	}

}
